package io.jplus.utils;

import java.util.UUID;

public class IdWorker {
    private static final Sequence worker = new Sequence();

    public IdWorker() {
    }

    public static long getId() {
        return worker.nextId();
    }

    public static String getIdStr() {
        return String.valueOf(worker.nextId());
    }

    public static synchronized String get32UUID() {
        return UUID.randomUUID().toString().replace("-", "");
    }

    public static void main(String[] args) {
        System.out.println(getId());
    }
}
